#pragma once

#ifndef xanalyzer
#define xanalyzer

#include "plugin.h"
#include <stack>
#include "Utf8Ini/Utf8Ini.h"


#define INSTRUCTIONSTACK_MAXSIZE 50
#define INSTRUCTION_FUNCT_POINTER_MAXSIZE 100
//#define REGISTER_MAXSIZE 10
#define VB_STUB_SIZE 32
#define VB_STUB_APISTR_POINTER 20

using namespace std;
using namespace Script;


typedef struct stCONFIG{
	bool extended_analysis;
}CONFIG;

extern CONFIG conf;
extern string config_path;
extern char szCurrentDirectory[MAX_PATH];

void OnBreakpoint(PLUG_CB_BREAKPOINT* bpInfo);
//void OnWinEvent(PLUG_CB_WINEVENT *info);
bool IsHex(const char *str);
duint hextoduint(LPCTSTR str);
void TruncateString(LPSTR str, char value);
void ToUpperHex(char *str);
string ToUpper(const char *str);
bool FileDbExists();
void LoadConfig();
void SaveConfig();

void DumpSTLMap(const char* keytype, const char* valtype);

#endif